@import 'variables';

.van {
  &-overflow-hidden {
    overflow: hidden !important;
  }

  &-popup {
    position: fixed;
    max-height: 100%;
    overflow-x: auto;
    background-color: $popup-background-color;
    transition: $popup-transition;
    -webkit-overflow-scrolling: touch;

    &--center {
      top: 50%;
      left: 50%;
      transform: translate3d(-50%, -50%, 0);

      &.van-popup--round {
        border-radius: $popup-round-border-radius;
      }
    }

    &--top {
      top: 0;
      left: 0;
      height: 100%;

      &.van-popup--round {
        border-radius: 0 0 $popup-round-border-radius $popup-round-border-radius;
      }
    }

    &--right {
      // top: 50%;
      top: 0;
      right: 0;
      height: 100%;
      // transform: translate3d(0, -50%, 0);

      &.van-popup--round {
        border-radius: $popup-round-border-radius 0 0 $popup-round-border-radius;
      }
    }

    &--bottom {
      bottom: 0;
      left: 0;
      height: 100%;

      &.van-popup--round {
        border-radius: $popup-round-border-radius $popup-round-border-radius 0 0;
      }
    }

    &--left {
      // top: -50%;
      top: 0;
      left: 0;
      // transform: translateY(50%);
      // transform: translate3d(-50%, 0, 0);

      &.van-popup--round {
        border-radius: 0 $popup-round-border-radius $popup-round-border-radius 0;
      }
    }

    &-slide-top-enter,
    &-slide-top-leave-active {
      transform: translate3d(0, -100%, 0);
    }

    &-slide-right-enter,
    &-slide-right-leave-active {
      transform: translate3d(100%, -50%, 0);
    }

    &-slide-bottom-enter,
    &-slide-bottom-leave-active {
      transform: translate3d(0, 100%, 0);
    }

    &-slide-left-enter,
    &-slide-left-leave-active {
      transform: translate3d(-100%, -50%, 0);
    }
  }
}
